package com.tyk.bookstore.front.comment.model.vo;


import com.tyk.bookstore.front.common.core.model.vo.PageVo;
import com.tyk.bookstore.front.common.core.util.FileUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author tyk
 * @description 回复
 */
@Data
public class ReplyPageVo extends PageVo<ReplyPageVo.Reply> {
    @Data
    public static class Reply {

        @Schema(description = "ID")
        private Long id;

        @Schema(description = "会员ID")
        private Long memberId;

        @Schema(description = "会员名称")
        private String memberName;

        @Schema(description = "父级评论者ID")
        private Long atMemberId;

        @Schema(description = "父级评论者名称")
        private String atMemberName;

        @Schema(description = "会员头像")
        private String memberAvatar;

        @Schema(description = "评论ID")
        private Long commentId;

        @Schema(description = "父级ID")
        private Long parentId;

        @Schema(description = "评论内容")
        private String content;

        @Schema(description = "评论时间")
        private LocalDateTime createTime;


        public Reply setMemberAvatar(String memberAvatar) {
            this.memberAvatar = FileUtil.fullFilePath(memberAvatar);
            return this;
        }
    }

}
